package org.cosmocalc;

public class Drdz implements MathFunction {
	private Cosmology cosmology;

	public Drdz(Cosmology cosmology) {
		this.cosmology = cosmology;
	}

	public double f(double z) {
		return (cosmology.getC_H() / Math.sqrt(Math.pow((1 + z), 2.)
				* (cosmology.getOmegaM() * z + 1) - cosmology.getOmegaL() * z
				* (z + 2)));
	}

}
